import * as actionTypes from './constants';
import { getDisGroupMessage } from '../../services';

const changeDisGroupMessage = (res) => ({
    type:actionTypes.CHANGE_DISGROUP_MESSAGE,
    disGroupMessage: res.data
})

export const getDisGroupMessageAction = () => {
    return dispatch => {
        getDisGroupMessage().then(res => {
            // console.log(res);
            dispatch(changeDisGroupMessage(res));
        })
    }
}